<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<!-- 开发环境版本，包含了有帮助的命令行警告 -->
		<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
		<style>
			div{
				width: 100PX;
				height: 100PX;
				background: red;
				/* transition:width 2s; */
				/* transition:background 2s; */
				/* transition:height 2s; */
				transition:width 2s; 
			}
			div:hover{
				width: 300px;
				/*background: yellow;*/
				/* height: 300px; */
			}
			.long{
				width: 300px;
			}
		</style>
		<title></title>
	</head>
	<body>
		<div id="app">
			
		</div>
		<button onclick="change()">点击我</button>
		<script>
			function change(){
				document.getElementById("app").classList.toggle('long');
			}
			
		</script>
		
	</body>
</html>
